package com.cy.pj.sys.dao;

import com.cy.pj.sys.pojo.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Set;

@Mapper
public interface SysUserDao {

    List<SysUser> selectUsers(SysUser entity);
    int insertUser(SysUser user);
    int updateUser(SysUser entity);
    @Update("update sys_users set valid=#{valid},modifiedTime=now(),modifiedUser=#{modifiedUser} " +
            "where id=#{id}")
    int validById(Integer id,Integer valid,String modifiedUser);
    SysUser selectById(Integer id);
    @Select("select * from sys_users where username=#{username}")
    SysUser selectUserByUsername(String username);

}
